//socket 连接
var net = require('net');
var client = new net.Socket();

module.exports.connectToRemort = connectToRemort = function() {
  client.connect(9527, "139.224.54.233");
  // var registerData = '{"from": "maxpup","to":"server","msgId": 1,"msgType":1,"cmd": 64}\r\n'
  // client.write(registerData, 'utf-8', function(data){
  //   console.log('----:' + data);
  // });

  client.on('data', function (data) {
      console.log('!!!!!!!!:' + data);
  });

  client.on('error', function (exception) {
      console.log('socket error:' + exception);
  //    client.end();
  });
}
